package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"unicode"
	"unicode/utf8"
)

func main() {
	counts := make(map[rune]int)
	characters := make(map[string]int)

	var utflen [utf8.UTFMax + 1]int
	invalid := 0
	in := bufio.NewReader(os.Stdin)
	for {
		r, n, err := in.ReadRune()
		if err == io.EOF {
			break
		}
		if err != nil {
			fmt.Fprintf(os.Stderr, "charcount: %v\n", err)
		}
		if utf8.RuneError == r {
			invalid++
			continue
		}

		counts[r]++
		utflen[n]++
		switch {
		case unicode.IsLetter(r):
			characters["字母"]++
		case unicode.IsDigit(r):
			characters["数字"]++
		case unicode.IsSpace(r):
			characters["空白"]++
		default:
			characters["其他"]++
		}

	}
}
